package chpt03;

import java.util.Scanner;

public class CreateObj {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		Object[] obj = new Object[n];
		for (int i = 0; i < n; i++) {
			String str=sc.next();
			if (str.equals("c"))
				obj[i] = new Computer();
			else if (str.equals("d")) {
				double dou = sc.nextDouble();
				obj[i] = new Double(dou);
			} else if (str.equals("i")) {
				int inte = sc.nextInt();
				obj[i] = new Integer(inte);
			} else if (str.equals("s")) {
				String s = sc.nextLine();
				obj[i] = new String(s);
			} else
				obj[i] = null;
		}
		for(int i = obj.length - 1; i >= 0; i--) {
			if (obj[i] != null)
				System.out.println(obj[i]);
		}
		System.out.println(Computer.toString());
		sc.close();
	}

}
